<div id="webboard"><div class="margin-left10 margin-top5 margin-bottom20 title">Webboard</div>



<?php 
Global $wpdb;

require_once(ABSPATH . WPINC . '/wp-db.php');
$rows =$wpdb->get_results("select * from bb_topics  order by topic_start_time desc LIMIT 0, 10") ;
echo  $wpdb->show_errors(); 
//print_r($rows);
?>





 <?php 
     	foreach($rows as $row):
	 	
    	 ?>

<!-- Webboard loop Start -->
<div class="texttoppage margin-right10 padding-bottom10 margin-left10" style="border-bottom: #000 dotted 1px;">
<div class="title margin-top5"></div>
<div class="margin-top5"><a href="<?php echo  get_option("board_url"); ?>/topic/<?php echo $row->topic_id; ?>" ><?php echo $row->topic_title; ?></a>
<div class="right" style="margin-top: 5px;">| 
<span class="margin-right20">View <a href="#">
<?php echo $row->topic_open; ?></a></span><span class="margin-right10">comment <a href="#"><?php echo  $row->topic_posts; ?></a></span></div>
<div class="clear"></div>
</div>
</div>
<!-- Webboard loop End -->

<?php endforeach; ?>
</div>
</div>